<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
	<!--
	/* Copyright (c) 2008, Katharine Berry
	* All rights reserved.
	*
	* Redistribution and use in source and binary forms, with or without
	* modification, are permitted provided that the following conditions are met:
	*     * Redistributions of source code must retain the above copyright
	*       notice, this list of conditions and the following disclaimer.
	*     * Redistributions in binary form must reproduce the above copyright
	*       notice, this list of conditions and the following disclaimer in the
	*       documentation and/or other materials provided with the distribution.
	*     * Neither the name of Katharine Berry nor the names of any contributors
	*       may be used to endorse or promote products derived from this software
	*       without specific prior written permission.
	*
	* THIS SOFTWARE IS PROVIDED BY KATHARINE BERRY ``AS IS'' AND ANY
	* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
	* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
	* DISCLAIMED. IN NO EVENT SHALL KATHARINE BERRY BE LIABLE FOR ANY
	* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
	* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
	* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
	* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
	* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
	* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	******************************************************************************/
	-->
	<head>
		<title>AjaxLife</title>
		<link href="{STATIC_ROOT}resources/css/ext-all.css" type="text/css" rel="stylesheet" />
		<link href="{STATIC_ROOT}resources/css/ytheme-aero.css" type="text/css" rel="stylesheet" />
		<script type="text/javascript" src="{STATIC_ROOT}AjaxLife.Libs.js"></script>
		<script type="text/javascript" src="{STATIC_ROOT}Crypto.js"></script>
		<link href="{STATIC_ROOT}login.css" type="text/css" rel="stylesheet" />
		<link href="{STATIC_ROOT}ui.css" type="text/css" rel="stylesheet" />
		<script type="text/javascript" src="{STATIC_ROOT}login.js"></script>
		<!-- The really big file -->
		<!-- <script type="text/javascript" src="{STATIC_ROOT}AjaxLife.All.js-{ENCODING)"></script> -->
		
		<!-- These are for if you need differing URLs for gzipped/non-gzipped versions.
		<link href="{STATIC_ROOT}resources/css/ext-all.css-{ENCODING}" type="text/css" rel="stylesheet" />
		<link href="{STATIC_ROOT}resources/css/ytheme-aero.css-{ENCODING}" type="text/css" rel="stylesheet" />
		<script type="text/javascript" src="{STATIC_ROOT}AjaxLife.Libs.js-{ENCODING}"></script>
		<script type="text/javascript" src="{STATIC_ROOT}Crypto.js-{ENCODING}"></script>
		<link href="{STATIC_ROOT}login.css-{ENCODING}" type="text/css" rel="stylesheet" />
		<link href="{STATIC_ROOT}ui.css-{ENCODING}" type="text/css" rel="stylesheet" />
		<script type="text/javascript" src="{STATIC_ROOT}login.js-{ENCODING}"></script>
		
		-->
		
		<!-- The below is used for development. -->
		<script src="{STATIC_ROOT}AjaxLife.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Strings.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Widgets.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Constants.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.InstantMessage.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Map.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.NameCache.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Network.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.SpatialChat.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Toolbar.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Friends.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.FrisntList.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Search.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.StatusBar.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Profile.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Utils.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Texture.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.AvatarsNear.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Inventory.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.InventoryDialogs.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Stats.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.MiniMap.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.ScriptDialogs.js" type="text/javascript"></script>
		<script src="{STATIC_ROOT}AjaxLife.Keyboard.js" type="text/javascript"></script>

		<script type="text/javascript">
			var gSessionID = "{SESSION_ID}";
			AjaxLife.STATIC_ROOT = "{STATIC_ROOT}";
			// RSA encryption details.
			var CHALLENGE = "{CHALLENGE}";
			var RSA_EXPONENT = "{RSA_EXPONENT}";
			var RSA_MODULUS = "{RSA_MODULUS}";
		</script>
	</head>
	<body class="ltr">
		<div id="loginscreen">
			<form action="" id="form_login">
				<!-- Right aligned. This goes before loginstuff because that makes
			loginstuff overlap this if the window is too small, rather than vice-versa -->
				<div id="advanced">
					<table>
						<tr>
							<td id="label_grid">(loading)</td>
							<td id="label_lang">(loading)</td>
						</tr>
						<tr>
							<td>
								<select id="grid">
									{GRID_OPTIONS}
								</select>
							</td>
							<td>
								<!-- This is filled when the script loads 
							As an added bonus, if your local language is available
							it will be used. -->
								<select name="lang" id="lang">
									<option value="en" selected="selected">(loading)</option>
								</select>
							</td>
						</tr>
					</table>
				</div>
				<!-- Left-aligned -->
				<table id="loginstuff">
					<tr>
						<td id="label_first">(loading)</td>
						<td id="label_last">(loading)</td>
						<td id="label_pass">(loading)</td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>
							<input type="text" id="first" />
						</td>
						<td>
							<input type="text" id="last" />
						</td>
						<td>
							<input type="password" id="password" />
						</td>
						<td>
							<input type="button" value="(loading)" id="btn_login" />
						</td>
					</tr>
				</table>
				<input type="hidden" name="sid" value="{SESSION_ID}" />
			</form>
		</div>
		<div id="uiscreen" style="display: none; height: 100%; width: 100%;">
			<img src="{STATIC_ROOT}images/background.jpg" id="background" alt="Background - island in the sunset" />
			<div id="statusbar"></div>
			<div id="toolbar"></div>
			<!-- Canvases seem to have issues with dynamic generation and scaling, at least in WebKit -->
			<canvas id="minimap" width="256" height="256"></canvas>
			<!-- This one is used to avoid having to redraw the backround each time. -->
			<canvas id="minimap-landscape" width="256" height="256"></canvas>
			<!-- This is hidden behind the background image. -->
		</div>
	</body>
</html>
